/*    */ package com.zimbra.cs.account.ldap.upgrade;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.util.StringUtil;
/*    */ import com.zimbra.cs.account.Config;
/*    */ import com.zimbra.cs.account.ldap.LdapProv;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class BUG_57039
/*    */   extends UpgradeOp
/*    */ {
/*    */   void doUpgrade()
/*    */     throws ServiceException
/*    */   {
/* 31 */     upgradeZimbraGalLdapAttrMap();
/*    */   }
/*    */   
/*    */   void upgradeZimbraGalLdapAttrMap() throws ServiceException {
/* 35 */     Config config = this.prov.getConfig();
/*    */     
/* 37 */     String attrName = "zimbraGalLdapAttrMap";
/* 38 */     String oldValue = "zimbraCalResLocationDisplayName,displayName=zimbraCalResLocationDisplayName";
/* 39 */     String newValue = "zimbraCalResLocationDisplayName=zimbraCalResLocationDisplayName";
/*    */     
/* 41 */     String[] curValues = config.getMultiAttr(attrName);
/*    */     
/* 43 */     for (String value : curValues) {
/* 44 */       if (value.equalsIgnoreCase(oldValue)) {
/* 45 */         Map<String, Object> attrs = new HashMap();
/* 46 */         StringUtil.addToMultiMap(attrs, "-" + attrName, oldValue);
/* 47 */         StringUtil.addToMultiMap(attrs, "+" + attrName, newValue);
/*    */         
/* 49 */         modifyAttrs(config, attrs);
/*    */       }
/*    */     }
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/ldap/upgrade/BUG_57039.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */